<template>
    <div>
        <h1>一个人的信息</h1>
        <h2>姓名：{{person.name}}</h2>
        <h2>年龄：{{person.age}}</h2>

    </div>
</template>

<script>

// import {h} from "vue";

// import {ref,reactive} from "vue";
import {reactive} from "vue";

export default {
    name: 'Demo',
    beforeCreate() {
        console.log("----beforeCreate----", this);
    },
    // props:['msg','school'],
    setup(props,context){
        console.log("----setup----", this);
        console.log("----setup props----", props);
        console.log("----setup context----", context.attrs);
        let person = reactive({
            name: '张三',
            age: 20,

        })

        return {
            person,
        }

    },
}
</script>

<style>
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
}
</style>
